<template>
  <li>
    <h3>姓名:{{ name }}</h3>
    <p>
      爱好:
      <span v-for="item in hobby" :key="item"> {{ item }} </span>
    </p>
    <span @click="deletePersonById(id)">X 删除当前的人</span>
  </li>
</template>

<script>
export default {
  name: "Item",
  // props的第一种写法: 数组写法,
  props: ["name", "hobby", "id", "deletePersonById"],
};
</script>

<style></style>
